<template>
    <div>
        {{$store.state.app.flag2}}
        {{app.flag2}}
        MapState:{{flag}}
        Getters: {{getFlag}}
    </div>
</template>

<script>import {mapState, mapGetters} from 'vuex'

export default {
    name: "VuexTest",
    computed: {
        ...mapState(['app']),
        ...mapState(
            {flag: state => state.app.flag}
        ),
        ...mapGetters(['getFlag'])
    },
    mounted() {
        this.$store.dispatch('ChangeFlage', {number: 10})
        this.$store.dispatch('getList')
    }
}
</script>

<style scoped>

</style>
